package com.jasmine.auth.model;

import com.fasterxml.jackson.annotation.JsonInclude;

import java.io.Serializable;

/**
 * Token实体
 * @author jasmineXz
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Token implements Serializable {

    /** token信息 */
    private String accessToken;
    /** token过期时间 */
    private Long accessExpires;

    /** 刷新token */
    private String refreshToken;
    /** 刷新token过期时间 */
    private Long refreshExpires;

    /** 用户信息 */
    private UserInfo userInfo;

    public Token() {
    }

    public Token(String accessToken, String refreshToken, UserInfo userInfo) {
        this.accessToken = accessToken;
        this.refreshToken = refreshToken;
        this.userInfo = userInfo;
    }

    public String getAccessToken() {
        return accessToken;
    }

    public void setAccessToken(String accessToken) {
        this.accessToken = accessToken;
    }

    public Long getAccessExpires() {
        return accessExpires;
    }

    public void setAccessExpires(Long accessExpires) {
        this.accessExpires = accessExpires;
    }

    public String getRefreshToken() {
        return refreshToken;
    }

    public void setRefreshToken(String refreshToken) {
        this.refreshToken = refreshToken;
    }

    public Long getRefreshExpires() {
        return refreshExpires;
    }

    public void setRefreshExpires(Long refreshExpires) {
        this.refreshExpires = refreshExpires;
    }

    public UserInfo getUserInfo() {
        return userInfo;
    }

    public void setUserInfo(UserInfo userInfo) {
        this.userInfo = userInfo;
    }
}
